package com.bw.liuyushan.liuyushan20210904.Adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bw.liuyushan.liuyushan20210904.Entity.VideoBean;
import com.bw.liuyushan.liuyushan20210904.R;
import com.bw.liuyushan.liuyushan20210904.Utils.GlideUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * Liuyushan20210904
 * file name is : TableVideoAdapter
 * created by Ender on 2021/9/4 9:35.
 * author : 刘雨杉
 * Describe:
 */
public class TableVideoAdapter extends BaseQuickAdapter<VideoBean.DataBean, BaseViewHolder> {
    public TableVideoAdapter(@Nullable List<VideoBean.DataBean> data) {
        super(R.layout.rvitemtab, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, VideoBean.DataBean dataBean) {
        Glide.with(getContext()).load(dataBean.getHeadpath()).circleCrop().into((ImageView) baseViewHolder.findView(R.id.img_head));
        Glide.with(getContext()).load(dataBean.getVideomainimg()).into((ImageView) baseViewHolder.findView(R.id.img_video));
        baseViewHolder.setText(R.id.tv_name,dataBean.getAuthname());
        baseViewHolder.setText(R.id.tv_item,dataBean.getCaption());
    }
}
